package com.xhwl.data.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhwl.common.pojo.cent.sdata.PublicArea;
import com.xhwl.common.query.cent.sdata.PublicAreaQuery;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: luyi
 * @Description:
 * @Date: Create in 9:37 2021/4/14
 */
@Repository
public interface IPublicAreaDao extends BaseMapper<PublicArea> {

    Page<PublicArea> page(@Param("page") Page page, @Param("publicAreaQuery") PublicAreaQuery publicAreaQuery);

    List<PublicArea> list(@Param("publicAreaQuery") PublicAreaQuery publicAreaQuery);

    /**
     * 获取当前id
     *
     * @return
     */
    @Select("select max(id) + 1 currentId from `cent_sdata`.`sdata_public_area`")
    Integer getCurrentId();
}
